package org.sample.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import java.time.LocalDateTime;

/**
 * Created by Alan on 2016/10/1.
 */
@Entity
public class Log extends BaseBO {

    private Integer userId;
    private String username;
    private String ip;
    private String uri;
    private String result;

    public Log() {
    }

    public Log(Integer userId, String username, String ip, String uri, String result) {
        this.userId = userId;
        this.username = username;
        this.ip = ip;
        this.uri = uri;
        this.result = result;
        this.createTime = LocalDateTime.now();
    }

    @Column(name = "user_id")
    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    @Column(name = "username")
    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    @Column(name = "ip")
    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    @Column(name = "uri")
    public String getUri() {
        return uri;
    }

    public void setUri(String uri) {
        this.uri = uri;
    }

    @Column(name = "result")
    public String getResult() {
        return result;
    }

    public void setResult(String result) {
        this.result = result;
    }

}